﻿@{
    ViewBag.Title = "编辑用户";
    var user = ViewBag.user as HynuIOTA.Entity.User;
}
@section scripts
{
    <script>
        function doBegin() {
            window.top.$.msgBoxObj.showMsgInfo('正在提交数据....');
        }

        function doFail() {
            window.top.$.msgBoxObj.showMsgErr('网络异常!');
        }

        function doComplete(xhrObj) {
            $.processJsonMsg(xhrObj.responseText);
        }
    </script>
}
@section headSection
{
    <style>
        #news-form {
            margin-top: 20px;
        }

            #news-form .input-div {
                margin: 20px 20px 20px 40px;
                display: block;
            }
    </style>
}
<div>
    @using (Ajax.BeginForm("PutUser", new { area = "Users", controller = "User" }, new AjaxOptions()
    {
        HttpMethod = "Put",
        OnBegin = "doBegin",
        OnFailure = "doFail",
        OnComplete = "doComplete"
    }, new { id = "news-form", name = "news-form" }))
    {
        <div class="input-div"><input id="Title" name="Title" value="@user.UserName" readonly="readonly" class="easyui-textbox" data-options="label:'用户名称：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="RealName" name="RealName" value="@user.RealName" class="easyui-textbox" data-options="label:'真实姓名：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="Gender" name="Gender" value="@user.Gender" class="easyui-textbox" data-options="label:'性别：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="Telephone" name="Telephone" value="@user.Telephone" class="easyui-textbox" data-options="label:'电话号码：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="QQNum" name="QQNum" value="@user.QQNum" class="easyui-textbox" data-options="label:'QQ号码：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="Email" name="Email" value="@user.Email" class="easyui-textbox" data-options="label:'Email邮箱：',labelPosition:'left',labelWidth:100," style="width:95%; height: 30px;"></div>
        <div class="input-div"><input id="Birthday" name="Birthday" class="easyui-textbox" value="@user.Birthday" data-options="label:'生日：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="Info" name="Info" class="easyui-textbox" value="@user.Info" data-options="label:'简介：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="PostCode" name="PostCode" class="easyui-textbox" value="@user.PostCode" data-options="label:'邮政编码：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input id="Address" name="Address" value="@user.Address" class="easyui-textbox" data-options="label:'通讯地址：',labelPosition:'left',labelWidth:100," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input value="@user.LastLoginIP" class="easyui-textbox" data-options="label:'最后登录IP：',labelPosition:'left',labelWidth:120," style="width: 95%; height: 30px;"></div>
        <div class="input-div"><input value="@user.LastLoginTime" class="easyui-textbox" data-options="label:'最后登录时间：',labelPosition:'left',labelWidth:120," style="width: 95%; height: 30px;"></div>
        <div class="input-div">
            <input type="submit" class="easyui-linkbutton button-blue l-btn l-btn-small" style="width: 80px; height: 40px; margin: 10px 10px 10px 200px" value="保存" />
        </div>
    }
</div>